ihelpuoo.parseInt = function(s,defValue)
{
	if(ihelpuoo.isBlank(s))
		if(defValue)
			return defValue;
		else
			return -1;
	else
		s = ihelpuoo.trimLeftBy(s,'0');
	if(s.length==0) return 0;
	var re = parseInt(s);
	if(!re)
		if(defValue)
			return defValue;
		else
			return -1;
	return re;
}

ihelpuoo.parseBoolean = function(s,defValue)
{
	if(null==s)
		if(defValue)
			return true;
		else
			return false;
	return "true"==s;
}

ihelpuoo.isObject = function(o)
{
	return "object"==(typeof o);
}

ihelpuoo.isBoolean = function(o)
{
	return "boolean"==(typeof o);
}

ihelpuoo.isNumber = function(o)
{
	return "number"==(typeof o);
}

ihelpuoo.isString = function(o)
{
	return "string"==(typeof o);
}

ihelpuoo.isFunction = function(o)
{
	return "function"==(typeof o);
}

ihelpuoo.codeIsNumber = function(code)
{
	return code>47 && code<58;
}

var HEXS = new Array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
ihelpuoo.toHexString = function(d)
{
  if(d<16)
	return HEXS[d];
  return ihelpuoo.toHexString(Math.floor(d/16))+HEXS[(d%16)];
}